-- GENERATED SPELL FOR [Ancient Watcher] --


function spell0_31229(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(33844,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31229', 6500, 1)
end

function spell1_31229(pUnit, Event) --@Trample,n/a--
pUnit:FullCastSpellOnTarget(51944,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31229', 564, 1)
end

function Sorts_31229(pUnit, Event)
local choix_sorts_31229 = math.random(0, 1)
if choix_sorts_31229 == 0 then
pUnit:RegisterEvent('spell0_31229', 1, 1)
end
if choix_sorts_31229 == 1 then
pUnit:RegisterEvent('spell1_31229', 1, 1)
end
end

function mob31229_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31229', math.random(1500, 3000), 1)
end

function mob31229_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31229_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31229_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31229, 1, 'mob31229_Action')
RegisterUnitEvent(31229, 2, 'mob31229_Leave')
RegisterUnitEvent(31229, 3, 'mob31229_Kill')
RegisterUnitEvent(31229, 4, 'mob31229_Die')
